package com.ibangnuo.framework.newLandpay.impl.response;

import com.ibangnuo.framework.newLandpay.api.NewLandpayResponse;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;

/**
 * @Author: wwy
 * @Date: 2020-01-09 15:13
 */
@Data
@ToString
@NoArgsConstructor
public class AliServicePayResponse implements NewLandpayResponse {
    private String returnCode;
    private Date sysTime;
    private String message;
    private String tradeNo;
    private String mercId;
    private String LogNo;
    private String result;
    private String orderNo;
    private String amount;
    private Double totalAmount;
    private String prepayId;
    private String apiAppid;
    private String subject;
    private String selOrderNo;
    private String attach;
    private String signValue;

    @Override
    public boolean isSuccess() {
        return StringUtils.isNotEmpty(returnCode);
    }

    @Override
    public String code() {
        return this.returnCode;
    }
}
